<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>是否展示</title>
</head>
<body>
<!--v-if and v-show-->
<div id="app">
    <p v-if="isShow == 1">v-if</p>
    <p v-show="isShow">v-show</p>
    <button @click="isShowUpDate">{{isShow? "影藏":"展示"}}</button>
</div>
</body>
</html>
<script src="js/vue.js"></script>
<script>
    new Vue({
        el: '#app',
        data: {
            isShow: 1
        },
        methods: {
            isShowUpDate() {
                this.isShow = !this.isShow
            }
        }
    })
</script>